Skip to content

feat(pam): clickhouse - #402

Merged
lb-vn merged 9 commits into
mainfrom
PAM-466
Sep 23, 2026
Merged

lb-vn merged 9 commits into
mainfrom
PAM-466

Conversation

@lb-vn

@lb-vn lb-vn commented Sep 17, 2026

Copy link
Copy Markdown
Member

Description 📣

Clickhouse

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

# Here's some code block to paste some code snippets

@lb-vn
lb-vn requested a review from bernie-g September 17, 2026 00:35
@gitguardian

gitguardian Bot commented Sep 17, 2026 •

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 3 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
37371931 Triggered Base64 Basic Authentication 6865c3e packages/pam/handlers/clickhouse/proxy_test.go View secret
37371932 Triggered Username Password 6865c3e packages/pam/handlers/clickhouse/proxy_test.go View secret
37409076 Triggered Generic High Entropy Secret bda0fe8 packages/pam/session/masking/masking_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@linear

linear Bot commented Sep 17, 2026

Copy link
Copy Markdown

PAM-466

Comment thread packages/pam/handlers/clickhouse/proxy.go Outdated
@veria-ai

veria-ai Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

All previously flagged issues have been addressed. No open security concerns remain on this pull request.

Security review

No open security issues remain on this pull request.

Fixed/addressed: 6 · PR risk: 0/10

@greptile-apps

greptile-apps Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the latest changes correctly close the ClickHouse quota-selection override without introducing a new actionable defect.

Summary

This PR adds ClickHouse HTTP-interface support to PAM, including connection testing, credential and execution-scope replacement, command-policy inspection, session auditing, local connection guidance, and capability advertisement. Since the previous review, it also closes the remaining quota override channels by stripping the correct ClickHouse quota header and query parameter.

  • Routes ClickHouse PAM sessions through a purpose-built HTTP reverse proxy.
  • Replaces client credentials, database, role, and quota selection with account-controlled settings.
  • Inspects supported request encodings for blocked commands and records completed outcomes.
  • Adds ClickHouse connection testing, local CLI guidance, resource registration, and tests.

Reviews (5) · Last reviewed commit: "fix header key"

Comment thread packages/pam/handlers/clickhouse/proxy.go Outdated
Comment thread packages/pam/handlers/clickhouse/proxy.go Outdated
Comment thread packages/pam/handlers/clickhouse/proxy.go
Comment thread packages/pam/handlers/clickhouse/proxy.go Outdated
Comment thread packages/pam/handlers/clickhouse/proxy.go
Comment thread packages/pam/handlers/clickhouse/proxy.go
Comment thread packages/pam/handlers/clickhouse/proxy.go
Comment thread packages/pam/handlers/clickhouse/proxy.go Outdated
Comment thread packages/pam/handlers/clickhouse/proxy.go
Comment thread packages/pam/handlers/clickhouse/proxy.go
# Conflicts:
#	packages/gateway-v2/capabilities.go
Comment thread packages/pam/handlers/clickhouse/proxy.go Outdated
@greptile-apps

greptile-apps Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@lb-vn
lb-vn merged commit 6877bc4 into main Sep 23, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants